package com.mycompany.mvc.config;

import java.util.Properties;

import com.mycompany.mvc.utils.PropertiesLoader;

/**
 *@author Jintao_Ma
 *@time 2016年7月23日14:26:12
 *@description:
 *	获取配置文件信息
 */
public class SystemConfig {

	private static Properties properties;
	
	private static String[] resourcesPaths = {"classpath:system.properties"};
	
	static{
	properties = new PropertiesLoader(resourcesPaths).getProperties();
	}
	
	public static String getProperty(String key){
		String systemProperty = System.getProperty(key);  
        if (systemProperty != null) {  
            return systemProperty;  
        }  
        return properties.getProperty(key);
	}
}
